package com.its.oa.model;

import java.util.HashSet;
import java.util.Set;

/**
 * Role entity. @author MyEclipse Persistence Tools
 */

public class Role implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	// Fields

	private Integer id;
	private String code;
	private String name;
	private String modCode;
	private Set<UserRole> userRoles = new HashSet<UserRole>(0);
	private Set<Permission> permissionRoles = new HashSet<Permission>(0);

	// Constructors

	/** default constructor */
	public Role() {
	}

	/** full constructor */
	public Role(String code, String name, String modCode, Set<UserRole> userRoles,
			Set<Permission> permissionRoles) {
		this.code = code;
		this.name = name;
		this.modCode = modCode;
		this.userRoles = userRoles;
		this.permissionRoles = permissionRoles;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getModCode() {
		return this.modCode;
	}

	public void setModCode(String modCode) {
		this.modCode = modCode;
	}

	public Set<UserRole> getUserRoles() {
		return this.userRoles;
	}

	public void setUserRoles(Set<UserRole> userRoles) {
		this.userRoles = userRoles;
	}

	public Set<Permission> getPermissionRoles() {
		return this.permissionRoles;
	}

	public void setPermissionRoles(Set<Permission> permissionRoles) {
		this.permissionRoles = permissionRoles;
	}

}